<template>
  <div class="index-wrap">
<div id="app">
    <div class="top-wrap">
      <header class="huya-header">
        <a
          class="logo clickstat"
          href="https://m.huya.com/"
          eid="click/nav1/icon"
          eid_desc="点击/列表导航/icon"
        ></a>
        <a class="header-app-btn u-btn-down" eid="click/general/appdl" eid_desc="点击/头部/打开App">打开App</a>
        <a
          class="header-search clickstat"
          href="https://m.huya.com/index.php?m=Search"
          eid="click/nav1/search"
          eid_desc="点击/列表导航/搜索"
        >
          <span class="header-search-icon"></span>
        </a>
      </header>
    </div>
    <div class="router-view">
      <div class="swiper-container">
        <div class="swiper-wrapper">
          <div class="swiper-slide">
            <router-link to="/shou">热门</router-link>
          </div>
          <div class="swiper-slide">
            <router-link to="/play">网游</router-link>
          </div>
          <div class="swiper-slide">
            <router-link to="/chiji">单机</router-link>
          </div>
          <div class="swiper-slide">
            <router-link to="/juedi">娱乐</router-link>
          </div>
          <div class="swiper-slide">
            <router-link to="/xingxiu">手游</router-link>
          </div>
        </div>
      </div>
       
 <router-link to="/shou"><i class="nav-icon-ws"></i></router-link>
  <gongge></gongge>
      <router-view />
    </div>
  </div>
  </div>
</template>

<script>
import Swiper from "swiper";
import "Swiper/dist/css/swiper.css";
import  gongge from "../module/GongGe/GongGe"
export default {
  name: 'Index',
  mounted() {
    var swiper = new Swiper(".swiper-container", {
      slidesPerView: 4,
      spaceBetween: 1,
      freeMode: true,
      pagination: {
        el: ".swiper-pagination",
        clickable: true
      }
    });
  },
  components:{
         gongge
  }
  
}
</script>
<style>
.top-wrap {
  position: fixed;
  top: 0;
  left: 0;
  height: 53px;
  width: 100%;
  background-color: #fff;
  z-index: 101;
}
.huya-header {
  position: relative;
  height: 40px;
  padding-top: 13px;
  border-bottom: 1px solid #ededed;
  background: #fff;
  z-index: 1;
}
.huya-header .logo {
  float: left;
  margin-left: 2%;
  background-image: url();
  width: 100px;
  height: 30px;
  background-size: 100% 100%;
  vertical-align: middle;
}
.huya-header .header-app-btn {
  float: right;
  margin-right: 2%;
  width: 86px;
  height: 28px;
  font-size: 13px;
  line-height: 28px;
  text-align: center;
  color: #fff;
  border-radius: 15px;
  background: #ffa200;
}
.huya-header .header-search {
  float: right;
  width: 42px;
  height: 28px;
  margin-right: 3%;
  background: #f4f4f4;
  border-radius: 14px;
}
.huya-header .header-search .header-search-icon {
  display: block;
  margin: 6px auto;
  width: 16px;
  height: 16px;
  background-image: url();
  background-size: 100% 100%;
}
.router-view {
  margin: 61px 0px 0px 0px;
}
html,
body {
  touch-action: none;
  position: relative;
  background:#ffff;
  height: 100%;
}
body {
  font-family: Helvetica, "Droid Sans", sans-serif;
  font-size: 15px;
  color: #000;
  margin: 0;
  padding: 0;
}
.swiper-container {
  width: 100%;
  height: 100%;
}
.swiper-slide {
  text-align: center;
  font-size: 19px;
  /* background: #fff; */

  /* Center slide text vertically */
  display: -webkit-box;
  display: -ms-flexbox;
  display: -webkit-flex;
  display: flex;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  -webkit-justify-content: center;
  justify-content: center;
  -webkit-box-align: center;
  -ms-flex-align: center;
  -webkit-align-items: center;
  align-items: center;
}
a {
  text-decoration: none;
  color: black;
}
.nav-icon-ws{
   position: absolute;
    top: -2px;
    right: 0px;
    z-index: 99;
    width: 20px;
    height: 20px;
    background-color: #ffffff;
    background-size: 100% 100%;
}
.nav-icon-ws{
    background-image: url();
}

</style>